package ng

import (
	"github.com/gin-gonic/gin"
	"net/http"
	_"app/api"
)

var heroService = HeroService{}

func QueryHeroes(c *gin.Context) {
	res, msg, data := heroService.QueryHeroes()
	c.JSON(http.StatusOK, gin.H{"res":res, "msg":msg,"data":data})
}

func QueryHeroInfo(c *gin.Context){
	id := c.Param("id");
	res, msg, data := heroService.QueryHeroInfo(id)
	c.JSON(http.StatusOK, gin.H{"res":res, "msg":msg,"data":data})
}
